package manager.vo;

import java.io.Serializable;
import java.sql.Date;

import cn.tool.Md5;

public class User implements Serializable{
	private static final long serialVersionUID = 1L;
    private Integer id;
    private String userid;
    private String password;
    private String name;
    private String identity;
    private Date reg_date;
	public User(Integer id, String userid, String password, String name,
			String identity,Date date) {
		super();
		this.id = id;
		this.userid = userid;
		this.password = password;
		this.name = name;
		this.identity = identity;
		this.reg_date = date;
	}
	public User() {
		super();
		// TODO Auto-generated constructor stub
	}
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getUserid() {
		return userid;
	}
	public void setUserid(String userid) {
		this.userid = userid;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = Md5.getMD5(password);//MD5加密
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getIdentity() {
		return identity;
	}
	public void setIdentity(String identity) {
		this.identity = identity;
	}
	public Date getReg_date() {
		return reg_date;
	}
	public void setReg_date(Date reg_date) {
		this.reg_date = reg_date;
	}
	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	@Override
	public String toString() {
		return "User [id=" + id + ", userid=" + userid + ", password="
				+ password + ", name=" + name + ", identity=" + identity
				+ ", reg_date=" + reg_date + "]";
	}
    
}
